<template>
    <div class='search-wrapper'>
        <div class="search-cont"><input v-model="queryParam" class="search-input" placeholder="请输入想要查询的信息，多个搜索条件以空格符"></div>
    </div>
</template>

<script>
export default {
    data(){
        return{
            queryParam:''
        }
    },

   watch:{
       queryParam:function(){
           let queryArr=this.queryParam.split(' ')
           if(this.queryParam === ''){
               queryArr=[]
           }
           this.$emit('solveQuery',queryArr)
       }
   }
}
</script>

<style lang='stylus' scoped>
    .search-wrapper
        height :40px
        line-height :40px
        background-color :#cccccc
        text-align :center
        .search-input
            width :60%
            height :25px
            border-radius :10px
            border :1px solid #c8cccf
            outline :0
</style>
